#ifndef BOMFILE_H
#define BOMFILE_H

#include "bomfile_global.h"
#include <QFile>
#include <QHash>
#include <QMap>
#include <QTextStream>
#include <QStringList>
#include "bom_file_define.h"
#include "qexppart.h"

class BOMFILE_EXPORT BOMFile : public QFile
{
  Q_OBJECT
public:
  BOMFile(QString filename);
  ~BOMFile();

  void createBOM(QList<QEXPPart*> parts,QStringList noParts,QStringList pages);
  void writeBOM();
 signals:
	void report(const QStringList&);

private:
  void check();
  QMap<QString,QString> m_designators;
  QHash<QString,QList<quint32> > m_designatorsNumber;
};

#endif // BOMFILE_H
